package com.bw.module_inspection.adapter

import android.view.View
import android.widget.ImageView
import com.bumptech.glide.Glide
import com.bw.lib_image.GlideImageLoader
import com.bw.module_inspection.R
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
/**
 * 智慧园区-07-巡检管理V1.1 史建军20250514
 */
class ImageAdapter:BaseQuickAdapter<String,BaseViewHolder>(R.layout.item_repair_img) {
    override fun convert(holder: BaseViewHolder, item: String) {

        val iv_add=holder.getView<ImageView>(R.id.iv_add)

        if (item == "初始"){
            iv_add.setImageResource(R.drawable.bg_add)
            iv_add.setPadding(60,60,60,60)
            GlideImageLoader.loadResImage(iv_add, R.drawable.add_gray,iv_add)

        }else{
            GlideImageLoader.loadImages(holder.itemView.context, item,iv_add)
            iv_add.setPadding(0,0,0,0)
        }

    }
}